encode{
  final ChannelBuffer buffer=(ChannelBuffer)msg;
  buffer.readerIndex(0);
    final int len=buffer.readableBytes() - 4;
    buffer.setInt(0,len);
  return buffer;
}
setHandshaked{ }
